﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Event.interface/IEvent 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       IEvent
* 创建时间：  2025/6/4 8:51:28
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using MediatR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Event.Interface
{
    public interface IEventPublisher
    {
        Task PublishLocalAsync<TEvent>(TEvent @event, CancellationToken cancellationToken = default)
            where TEvent : INotification;

        Task PublishDistributedAsync<TEvent>(TEvent @event, IDictionary<string, string> headers = null,
            CancellationToken cancellationToken = default)
            where TEvent : class;
    }
}
